define(function () {
    //电话回访
    var callBack = {
        name:'call-back',
        template:'' +
        '<div class="owner-li2">'+
        '    <p>'+
        '        <span>'+
        '            <em>回访人：</em>{{dataObj.visitingPerson}}</span>'+
        '        <span>'+
        '            <em>回访时间：</em>{{dataObj.revisitDays}}</span></p>'+
        '    <p>'+
        '        <em class="em-box">{{dataObj.contentText}}</em>'+
        '        <strong :class="connectionStyle">{{connectionState}}</strong>'+
        '        <strong :class="intentionStyle">{{intentionState}}</strong></p>'+
        '</div>',
        props: {
            dataObj: {
                type: Object,
                default: function () {
                    return {
                    }
                }
            }
        },
        computed: {
            connectionState: function () {
                var releaseMsg = ''
                switch (this.dataObj.intentionState) {
                    case 0: {
                        this.connectionStyle.not = true
                        releaseMsg = '已接机'
                        break
                    }
                    case 1: {
                        this.connectionStyle.alreadyA = true
                        releaseMsg = '未接通'
                        break
                    }
                }
                return releaseMsg
            },
            intentionState: function () {
                var releaseMsg = ''
                switch (this.dataObj.intentionState) {
                    case 0: {
                        this.intentionStyle.alreadyA = true
                        releaseMsg = '意向强烈'
                        break
                    }
                    case 1: {
                        this.intentionStyle.intention = true
                        releaseMsg = '意向一般'
                        break
                    }
                    case 2: {
                        this.intentionStyle.weak = true
                        releaseMsg = '意向较弱'
                        break
                    }
                }
                return releaseMsg
            }
        },
        data: function () {
            return {
                connectionStyle:{
                    'not': false,
                    'alreadyA': false
                },
                intentionStyle:{
                    'alreadyA': false,
                    'intention':false,
                    'weak': false
                }
            }
        }
    }
    return callBack
})
